package com.xu.sso.web.service;

import com.xu.sso.core.exception.SSOException;
import com.xu.sso.core.model.BaseResponse;
import com.xu.sso.db.model.base.ApiAuth;
import com.xu.sso.db.model.base.Department;
import com.xu.sso.web.model.request.UpdateDepRequest;
import com.xu.sso.web.model.response.ApiKeyResponse;

import java.util.List;

public interface ManageService {

    List<Department> findAllDepartment();

    Department findDepartmentById(Integer id);

    BaseResponse createDepartment(Department department) throws SSOException;

    BaseResponse updateDepartment(UpdateDepRequest request) throws SSOException;

    BaseResponse deleteDep(Integer id) throws SSOException;

    ApiAuth findApiAuthById(Integer id);

    List<ApiAuth> findAllApiAuths();

    BaseResponse createApiAuth(ApiAuth apiAuth) throws SSOException;

    BaseResponse updateApiAuth(ApiAuth apiAuth) throws SSOException;

    ApiKeyResponse createApiKey() throws SSOException;

    BaseResponse changeApiStatus(Integer id, String status) throws SSOException;

    BaseResponse deleteApiAuth(Integer id) throws SSOException;

    BaseResponse refreshRedis() throws SSOException;

}
